<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8">
    
    <title>System configuration &mdash; NumPy v1.18 Manual</title>
    
    <link rel="stylesheet" type="text/css" href="../../_static/css/spc-bootstrap.css">
    <link rel="stylesheet" type="text/css" href="../../_static/css/spc-extend.css">
    <link rel="stylesheet" href="../../_static/scipy.css" type="text/css" >
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" >
    <link rel="stylesheet" href="../../_static/graphviz.css" type="text/css" >
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../',
        VERSION:     '1.18.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  false
      };
    </script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <script type="text/javascript" src="../../_static/language_data.js"></script>
    <script type="text/javascript" src="../../_static/js/copybutton.js"></script>
    <link rel="author" title="About these documents" href="../../about.html" >
    <link rel="index" title="Index" href="../../genindex.html" >
    <link rel="search" title="Search" href="../../search.html" >
    <link rel="top" title="NumPy v1.18 Manual" href="../../index.html" >
    <link rel="up" title="NumPy C-API" href="index.html" >
    <link rel="next" title="Data Type API" href="dtype.html" >
    <link rel="prev" title="Python Types and C-Structures" href="types-and-structures.html" > 
  </head>
  <body>
<div class="container">
  <div class="top-scipy-org-logo-header" style="background-color: #a2bae8;">
    <a href="../../index.html">
      <img border=0 alt="NumPy" src="../../_static/numpy_logo.png"></a>
    </div>
  </div>
</div>


    <div class="container">
      <div class="main">
        
	<div class="row-fluid">
	  <div class="span12">
	    <div class="spc-navbar">
              
    <ul class="nav nav-pills pull-left">
        <li class="active"><a href="https://numpy.org/">NumPy.org</a></li>
        <li class="active"><a href="https://numpy.org/doc">Docs</a></li>
        
        <li class="active"><a href="../../index.html">NumPy v1.18 Manual</a></li>
        

          <li class="active"><a href="../index.html" >NumPy Reference</a></li>
          <li class="active"><a href="index.html" accesskey="U">NumPy C-API</a></li> 
    </ul>
              
              
    <ul class="nav nav-pills pull-right">
      <li class="active">
        <a href="../../genindex.html" title="General Index"
           accesskey="I">index</a>
      </li>
      <li class="active">
        <a href="dtype.html" title="Data Type API"
           accesskey="N">next</a>
      </li>
      <li class="active">
        <a href="types-and-structures.html" title="Python Types and C-Structures"
           accesskey="P">previous</a>
      </li>
    </ul>
              
	    </div>
	  </div>
	</div>
        

	<div class="row-fluid">
      <div class="spc-rightsidebar span3">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../../contents.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">System configuration</a><ul>
<li><a class="reference internal" href="#data-type-sizes">Data type sizes</a></li>
<li><a class="reference internal" href="#platform-information">Platform information</a></li>
<li><a class="reference internal" href="#compiler-directives">Compiler directives</a></li>
<li><a class="reference internal" href="#interrupt-handling">Interrupt Handling</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="types-and-structures.html"
                        title="previous chapter">Python Types and C-Structures</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="dtype.html"
                        title="next chapter">Data Type API</a></p>
<div id="searchbox" style="display: none" role="search">
  <h4>Quick search</h4>
    <div>
    <form class="search" action="../../search.html" method="get">
      <input type="text" style="width: inherit;" name="q" />
      <input type="submit" value="search" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
          <div class="span9">
            
        <div class="bodywrapper">
          <div class="body" id="spc-section-body">
            
  <div class="section" id="system-configuration">
<h1>System configuration<a class="headerlink" href="#system-configuration" title="Permalink to this headline">¶</a></h1>
<p>When NumPy is built, information about system configuration is
recorded, and is made available for extension modules using NumPy’s C
API.  These are mostly defined in <code class="docutils literal notranslate"><span class="pre">numpyconfig.h</span></code> (included in
<code class="docutils literal notranslate"><span class="pre">ndarrayobject.h</span></code>). The public symbols are prefixed by <code class="docutils literal notranslate"><span class="pre">NPY_*</span></code>.
NumPy also offers some functions for querying information about the
platform in use.</p>
<p>For private use, NumPy also constructs a <code class="docutils literal notranslate"><span class="pre">config.h</span></code> in the NumPy
include directory, which is not exported by NumPy (that is a python
extension which use the numpy C API will not see those symbols), to
avoid namespace pollution.</p>
<div class="section" id="data-type-sizes">
<h2>Data type sizes<a class="headerlink" href="#data-type-sizes" title="Permalink to this headline">¶</a></h2>
<p>The <code class="xref c c-data docutils literal notranslate"><span class="pre">NPY_SIZEOF_{CTYPE}</span></code> constants are defined so that sizeof
information is available to the pre-processor.</p>
<dl class="var">
<dt id="c.NPY_SIZEOF_SHORT">
<code class="sig-name descname">NPY_SIZEOF_SHORT</code><a class="headerlink" href="#c.NPY_SIZEOF_SHORT" title="Permalink to this definition">¶</a></dt>
<dd><p>sizeof(short)</p>
</dd></dl>

<dl class="var">
<dt id="c.NPY_SIZEOF_INT">
<code class="sig-name descname">NPY_SIZEOF_INT</code><a class="headerlink" href="#c.NPY_SIZEOF_INT" title="Permalink to this definition">¶</a></dt>
<dd><p>sizeof(int)</p>
</dd></dl>

<dl class="var">
<dt id="c.NPY_SIZEOF_LONG">
<code class="sig-name descname">NPY_SIZEOF_LONG</code><a class="headerlink" href="#c.NPY_SIZEOF_LONG" title="Permalink to this definition">¶</a></dt>
<dd><p>sizeof(long)</p>
</dd></dl>

<dl class="var">
<dt id="c.NPY_SIZEOF_LONGLONG">
<code class="sig-name descname">NPY_SIZEOF_LONGLONG</code><a class="headerlink" href="#c.NPY_SIZEOF_LONGLONG" title="Permalink to this definition">¶</a></dt>
<dd><p>sizeof(longlong) where longlong is defined appropriately on the
platform.</p>
</dd></dl>

<dl class="var">
<dt id="c.NPY_SIZEOF_PY_LONG_LONG">
<code class="sig-name descname">NPY_SIZEOF_PY_LONG_LONG</code><a class="headerlink" href="#c.NPY_SIZEOF_PY_LONG_LONG" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="var">
<dt id="c.NPY_SIZEOF_FLOAT">
<code class="sig-name descname">NPY_SIZEOF_FLOAT</code><a class="headerlink" href="#c.NPY_SIZEOF_FLOAT" title="Permalink to this definition">¶</a></dt>
<dd><p>sizeof(float)</p>
</dd></dl>

<dl class="var">
<dt id="c.NPY_SIZEOF_DOUBLE">
<code class="sig-name descname">NPY_SIZEOF_DOUBLE</code><a class="headerlink" href="#c.NPY_SIZEOF_DOUBLE" title="Permalink to this definition">¶</a></dt>
<dd><p>sizeof(double)</p>
</dd></dl>

<dl class="var">
<dt id="c.NPY_SIZEOF_LONG_DOUBLE">
<code class="sig-name descname">NPY_SIZEOF_LONG_DOUBLE</code><a class="headerlink" href="#c.NPY_SIZEOF_LONG_DOUBLE" title="Permalink to this definition">¶</a></dt>
<dd><p>sizeof(longdouble) (A macro defines <strong>NPY_SIZEOF_LONGDOUBLE</strong> as well.)</p>
</dd></dl>

<dl class="var">
<dt id="c.NPY_SIZEOF_PY_INTPTR_T">
<code class="sig-name descname">NPY_SIZEOF_PY_INTPTR_T</code><a class="headerlink" href="#c.NPY_SIZEOF_PY_INTPTR_T" title="Permalink to this definition">¶</a></dt>
<dd><p>Size of a pointer on this platform (sizeof(void *)) (A macro defines
NPY_SIZEOF_INTP as well.)</p>
</dd></dl>

</div>
<div class="section" id="platform-information">
<h2>Platform information<a class="headerlink" href="#platform-information" title="Permalink to this headline">¶</a></h2>
<dl class="var">
<dt id="c.NPY_CPU_X86">
<code class="sig-name descname">NPY_CPU_X86</code><a class="headerlink" href="#c.NPY_CPU_X86" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="var">
<dt id="c.NPY_CPU_AMD64">
<code class="sig-name descname">NPY_CPU_AMD64</code><a class="headerlink" href="#c.NPY_CPU_AMD64" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="var">
<dt id="c.NPY_CPU_IA64">
<code class="sig-name descname">NPY_CPU_IA64</code><a class="headerlink" href="#c.NPY_CPU_IA64" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="var">
<dt id="c.NPY_CPU_PPC">
<code class="sig-name descname">NPY_CPU_PPC</code><a class="headerlink" href="#c.NPY_CPU_PPC" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="var">
<dt id="c.NPY_CPU_PPC64">
<code class="sig-name descname">NPY_CPU_PPC64</code><a class="headerlink" href="#c.NPY_CPU_PPC64" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="var">
<dt id="c.NPY_CPU_SPARC">
<code class="sig-name descname">NPY_CPU_SPARC</code><a class="headerlink" href="#c.NPY_CPU_SPARC" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="var">
<dt id="c.NPY_CPU_SPARC64">
<code class="sig-name descname">NPY_CPU_SPARC64</code><a class="headerlink" href="#c.NPY_CPU_SPARC64" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="var">
<dt id="c.NPY_CPU_S390">
<code class="sig-name descname">NPY_CPU_S390</code><a class="headerlink" href="#c.NPY_CPU_S390" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="var">
<dt id="c.NPY_CPU_PARISC">
<code class="sig-name descname">NPY_CPU_PARISC</code><a class="headerlink" href="#c.NPY_CPU_PARISC" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified added">New in version 1.3.0.</span></p>
</div>
<p>CPU architecture of the platform; only one of the above is
defined.</p>
<p>Defined in <code class="docutils literal notranslate"><span class="pre">numpy/npy_cpu.h</span></code></p>
</dd></dl>

<dl class="var">
<dt id="c.NPY_LITTLE_ENDIAN">
<code class="sig-name descname">NPY_LITTLE_ENDIAN</code><a class="headerlink" href="#c.NPY_LITTLE_ENDIAN" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="var">
<dt id="c.NPY_BIG_ENDIAN">
<code class="sig-name descname">NPY_BIG_ENDIAN</code><a class="headerlink" href="#c.NPY_BIG_ENDIAN" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="var">
<dt id="c.NPY_BYTE_ORDER">
<code class="sig-name descname">NPY_BYTE_ORDER</code><a class="headerlink" href="#c.NPY_BYTE_ORDER" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified added">New in version 1.3.0.</span></p>
</div>
<p>Portable alternatives to the <code class="docutils literal notranslate"><span class="pre">endian.h</span></code> macros of GNU Libc.
If big endian, <a class="reference internal" href="#c.NPY_BYTE_ORDER" title="NPY_BYTE_ORDER"><code class="xref c c-data docutils literal notranslate"><span class="pre">NPY_BYTE_ORDER</span></code></a> == <a class="reference internal" href="#c.NPY_BIG_ENDIAN" title="NPY_BIG_ENDIAN"><code class="xref c c-data docutils literal notranslate"><span class="pre">NPY_BIG_ENDIAN</span></code></a>, and
similarly for little endian architectures.</p>
<p>Defined in <code class="docutils literal notranslate"><span class="pre">numpy/npy_endian.h</span></code>.</p>
</dd></dl>

<dl class="function">
<dt id="c.PyArray_GetEndianness">
<code class="sig-name descname">PyArray_GetEndianness</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#c.PyArray_GetEndianness" title="Permalink to this definition">¶</a></dt>
<dd><div class="versionadded">
<p><span class="versionmodified added">New in version 1.3.0.</span></p>
</div>
<p>Returns the endianness of the current platform.
One of <code class="xref c c-data docutils literal notranslate"><span class="pre">NPY_CPU_BIG</span></code>, <code class="xref c c-data docutils literal notranslate"><span class="pre">NPY_CPU_LITTLE</span></code>,
or <code class="xref c c-data docutils literal notranslate"><span class="pre">NPY_CPU_UNKNOWN_ENDIAN</span></code>.</p>
</dd></dl>

</div>
<div class="section" id="compiler-directives">
<h2>Compiler directives<a class="headerlink" href="#compiler-directives" title="Permalink to this headline">¶</a></h2>
<dl class="var">
<dt id="c.NPY_LIKELY">
<code class="sig-name descname">NPY_LIKELY</code><a class="headerlink" href="#c.NPY_LIKELY" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="var">
<dt id="c.NPY_UNLIKELY">
<code class="sig-name descname">NPY_UNLIKELY</code><a class="headerlink" href="#c.NPY_UNLIKELY" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="var">
<dt id="c.NPY_UNUSED">
<code class="sig-name descname">NPY_UNUSED</code><a class="headerlink" href="#c.NPY_UNUSED" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</div>
<div class="section" id="interrupt-handling">
<h2>Interrupt Handling<a class="headerlink" href="#interrupt-handling" title="Permalink to this headline">¶</a></h2>
<dl class="var">
<dt id="c.NPY_INTERRUPT_H">
<code class="sig-name descname">NPY_INTERRUPT_H</code><a class="headerlink" href="#c.NPY_INTERRUPT_H" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="var">
<dt id="c.NPY_SIGSETJMP">
<code class="sig-name descname">NPY_SIGSETJMP</code><a class="headerlink" href="#c.NPY_SIGSETJMP" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="var">
<dt id="c.NPY_SIGLONGJMP">
<code class="sig-name descname">NPY_SIGLONGJMP</code><a class="headerlink" href="#c.NPY_SIGLONGJMP" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="var">
<dt id="c.NPY_SIGJMP_BUF">
<code class="sig-name descname">NPY_SIGJMP_BUF</code><a class="headerlink" href="#c.NPY_SIGJMP_BUF" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="var">
<dt id="c.NPY_SIGINT_ON">
<code class="sig-name descname">NPY_SIGINT_ON</code><a class="headerlink" href="#c.NPY_SIGINT_ON" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="var">
<dt id="c.NPY_SIGINT_OFF">
<code class="sig-name descname">NPY_SIGINT_OFF</code><a class="headerlink" href="#c.NPY_SIGINT_OFF" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</div>
</div>


          </div>
        </div>
          </div>
        </div>
      </div>
    </div>

    <div class="container container-navbar-bottom">
      <div class="spc-navbar">
        
      </div>
    </div>
    <div class="container">
    <div class="footer">
    <div class="row-fluid">
    <ul class="inline pull-left">
      <li>
        &copy; Copyright 2008-2019, The SciPy community.
      </li>
      <li>
      Last updated on Feb 20, 2020.
      </li>
      <li>
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 2.4.2.
      </li>
    </ul>
    </div>
    </div>
    </div>
  </body>
</html>